experimentII.m

Calculates the Probit-based static entry thresholds and profits per consumer presented in Table II of Abbring and Campbell's ''Last-In First-Out Oligopoly Dynamics.''

Contents

Set grid of innovation variances examined.

sigmaG=[0 0.05 0.1 0.15];

Set remaining parameters.

This section creates the structures with all parameters required for the model's solution. Some of these are replaced later when cycling through the grid points.

% Parameters for approximating the innovation distribution
approximateARG.F=@(x) (1+erf(x/sqrt(2)))./2;
approximateARG.Frange=4.0;
approximateARG.k=51;

% Parameters for approximating the Markov chain.
markovARG.approximateARG=approximateARG;
markovARG.rho=1.0;
markovARG.sigma=0.30;       %Placeholder value
markovARG.omegaCenter=0.0;
markovARG.omegaStep=0.005;
markovARG.omegaWidth=3;

% Parameters describing profits and discounting.
bellmanARG.k=4;
bellmanARG.piF = @(x) bellmanARG.k*ones(size(x));
bellmanARG.kappa=1.75;
bellmanARG.beta=1.05^(-1);             %5 percent annual interest rate.
bellmanARG.phi = @(N) 0.25*bellmanARG.beta/(1-bellmanARG.beta);
bellmanARG.markovARG=markovARG;

Equilibrium and parameter calculation

% Mark cpu time for efficiency calculations.
tstart=cputime;

% Cycle through the parameter values and calculate the statistics of interest.
nPoints=size(sigmaG,2);
probitThresholds=NaN(nPoints,1);

for iter=1:nPoints;

    markovARG.sigma=sigmaG(iter);
    bellmanARG.markovARG=markovARG;

    bellman
    thresholds
    ergodic
    probitARG.cn=[kron(ones(maxN-minN+1,1),omega') kron((minN:1:maxN)',ones(nCstates,1))];
    probitARG.v=v;
    probit

    probitThresholds(iter,1:maxN)=mProbitC';
    if maxN<size(probitThresholds,2)
        probitThresholds(iter,maxN+1:end)=NaN;
    end

    clear Pi %This triggers the recalculation of the approximating Markov chain on the next trip through this loop.

end

Calculate implied rate of decline for \pi(N)

temp=probitThresholds./(ones(length(sigmaG),1)*(minN+1:1:minN+size(probitThresholds,2)));
PiRatio = temp(:,1:end-1)./temp(:,2:end);

%Convert these into the level of profit per customer relative to its monopoly level.
PiRatio=cumprod(PiRatio,2);
PiRatio=[ones(size(PiRatio,1),1) PiRatio];

Create Table II by writing results to a LaTeX file.

latextableII;

%Write the two panels to a LaTeX file
f1=fopen('ac2aExperimentII.tex','w');
for i=1:1:size(tablestra,1)
    fprintf(f1,'%s \n',tablestra(i,:));
end
fprintf(f1,'\n \\bigskip \n \n');

for i=1:1:size(tablestrb,1)
    fprintf(f1,'%s \n',tablestrb(i,:));
end

fclose(f1);

Write table elements referenced in the text to LaTeX macros.

This automation creates an audit trail for these numbers.

f1=fopen('ac2aExperimentIIText.tex','w');
fprintf(f1,'\\def\\piRatioFourTwo{$%3.2f$}\n',PiRatio(4,2));
fclose(f1);

Display computation time.

disp(['Experiment took ' num2str(cputime-tstart,'%6.2f') ' seconds']);
Experiment took 80.66 seconds